template<typename T>
TSingleton<T>::TSingleton()
{
	assert(!ms_pkSingleton);

	ms_pkSingleton = static_cast<T*>(this);
}

template<typename T>
TSingleton<T>::~TSingleton()
{
	SafeDelete(ms_pkSingleton);
}

template<typename T>
inline T* TSingleton<T>::GetSingletonPtr()
{
	return ms_pkSingleton;
}

template<typename T>
inline T& TSingleton<T>::GetSingleton()
{
	return *ms_pkSingleton;
}